import Layout from '@/layout'
import RouteButtonsBuilder from '@/framework/infra/router/RouterButtonsBuilder'

export default [
  {
    path: '/ums',
    component: Layout,
    name: 'ums',
    meta: { title: '用户管理', icon: 'el-icon-user-solid' },
    children: [
      // {
      //   path: 'anchor',
      //   name: 'ums-anchor',
      //   component: () => import('@/feature/ums/app/anchor/index'),
      //   meta: { title: '圈主管理', icon: 'el-icon-user' },
      //   buttons: RouteButtonsBuilder.builder('ums-anchor').r().ss()
      //     .addButtons([{
      //       name: 'check-resolve', type: TableButtonType.ROW, label: '审核通过',
      //       showFilter: row => row.status !== AnchorStatusEnum.RESOLVE.id
      //     }, {
      //       name: 'check-reject',
      //       type: TableButtonType.ROW,
      //       label: '审核拒绝',
      //       buttonType: 'danger',
      //       showFilter: row => row.status !== AnchorStatusEnum.REJECTED.id
      //     }])
      //     .build()
      // },
      // {
      //   path: 'collection',
      //   name: 'ums-collection',
      //   component: () => import('@/feature/ums/app/collection/index'),
      //   meta: { title: '用户收藏', icon: 'table' },
      //   buttons: RouteButtonsBuilder.builder('ums-collection').curd()
      //     .build()
      // },
      // {
      //   path: 'fans-followed',
      //   name: 'ums-fans-followed',
      //   component: () => import('@/feature/ums/app/fans-followed/index'),
      //   meta: { title: '关注者和粉丝', icon: 'table' },
      //   buttons: RouteButtonsBuilder.builder('ums-fans-followed').curd()
      //     .build()
      // },
      // {
      //   path: 'skilled-field',
      //   name: 'ums-skilled-field',
      //   component: () => import('@/feature/ums/app/skilled-field/index'),
      //   meta: { title: '擅长领域', icon: 'el-icon-user' },
      //   buttons: RouteButtonsBuilder.builder('ums-skilled-field').curd()
      //     .build()
      // },
      {
        path: 'user',
        name: 'ums-user',
        component: () => import('@/feature/ums/app/user/index'),
        meta: { title: '用户管理', icon: 'el-icon-user' },
        buttons: RouteButtonsBuilder.builder('ums-user').r()
          .build()
      },
      // {
      //   path: 'user-level',
      //   name: 'ums-user-level',
      //   component: () => import('@/feature/ums/app/user-level/index'),
      //   meta: { title: '会员等级', icon: 'table' },
      //   buttons: RouteButtonsBuilder.builder('ums-user-level').curd()
      //     .build()
      // },
      // {
      //   path: 'user-receive-address',
      //   name: 'ums-user-receive-address',
      //   component: () => import('@/feature/ums/app/user-receive-address/index'),
      //   meta: { title: '用户收货地址', icon: 'table' },
      //   buttons: RouteButtonsBuilder.builder('ums-user-receive-address').curd()
      //     .build()
      // },
      {
        path: 'user',
        component: () => import('@/feature/ums/app/user/index'),
        meta: { title: '用户', icon: 'table' },
        buttons: RouteButtonsBuilder.builder('ums:user')

          .addButtons([
              {
                handler: 'list',
                name: 'list',
                type: TableButtonType.SEARCHBAR,
                label: '搜索',
                icon: 'el-icon-search'
              },
              {
                handler: 'export',
                name: 'export',
                type: TableButtonType.TOOLBAR_RIGHT,
                label: '导出',
                buttonType: 'primary',
                icon: 'el-icon-download'
              },
              {
                handler: 'create',
                name: 'create',
                type: TableButtonType.TOOLBAR,
                label: '新建用户',
                icon: 'el-icon-plus'
              },
              {
                handler: 'update',
                name: 'update',
                type: TableButtonType.ROW,
                label: '修改',
                icon: 'el-icon-edit'
              },
              {
                handler: 'remove',
                name: 'remove',
                type: TableButtonType.ROW,
                label: '删除',
                buttonType: 'danger',
                icon: 'el-icon-delete'
              }



          ])
          .build()
      }
      // #appendSpot# 生成工具用，不要删了
    ]
  }
]
